﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<NormControlDoc>" %>
<tr>
    <td>
        <%: Model.DateSanded %>
    </td>
    <td>
        <%: Model.FileName%>
    </td>
    <td>
        <a href='<%: Url.RouteUrl("Default", new {controller="NormControlDocs", action="GetDoc", id = Model.NormControlDocId}) %>'>
            <img src='<%: Url.Content("~/Content/Icons/doc.png")%>' class='mediumIcon' /></a> 
        <a href='<%: Url.RouteUrl("Default", new {controller="NormControlDocs", action="GetPdf", id = Model.NormControlDocId}) %>'>
            <img src='<%: Url.Content("~/Content/Icons/pdf.png")%>' class='mediumIcon' /></a>
    </td>
    <%if (ViewData["LoggedUser"] is Lecturer)
      { %>
    <% bool isDocPassed = Model.IsPassed; %>
    <td>
        <div class='<%: isDocPassed ? "taskCompleted" : ".taskNotCompleted" %>'>
            <%: Html.Hidden("id", Model.NormControlDocId)%>
            <input type="checkbox" <%: isDocPassed ? "checked='checked'" : "" %> name="is" />
        </div>
    </td>
    <%} %>
</tr>
